const express = require('express')
const router = express()
const weatherData = require('../data/mock')

router.get('/weather', (req, res) => {
    const query = req.query // 查询字符
        res.send({
            status: 200,
            msg: 'get请求成功',
            data: weatherData
        })
})

router.post('/weather', (req, res) => {
    res.send('post成功')
})

module.exports = router